﻿<!--#include file="const.inc"-->
<%
'====================================================================
' 感谢使用晴天3G智能建站系统..
' 作者:梁永强.QQ:766750857
' 官方网址:wap.qt3g.com
' 声明:软件版权归作者所有,没有经过作者本人同意不得非法破解和传播本程序
'====================================================================
dim myid
myid=qingtian.nid
%>
<card id="card1" title="每天工作"><p>
<% wap=request.querystring("wap") %>
<%
dim rd,ids
rd=Cstr(request("rd"))
ids=myid
%>

<%
set rs=Server.CreateObject("ADODB.Recordset")
strSQL="select * from sx where cstr(ids)="&myid
rs.open strSQL,liao,1,1
%>
<%
  set objgbrs=Server.CreateObject("ADODB.Recordset")
   sql="Delete FROM gguan WHERE  DATEDIFF('s', time, now()) > 720*60"
liao.Execute sql
Set rec=Server.CreateObject("ADODB.Recordset")

SQL="SELECT * FROM gguan where cstr(ids)="&myid
rec.Open SQL,liao
    if not rec.eof then
       msg="今天您已工作过了，不用太辛苦的!!"
else
          SQL="insert into gguan(ids,topao)values("
          SQL=SQL & sqlstr(ids) & ","
          SQL=SQL & sqlstr(rd) & ")"
          Application.Lock
          liao.execute SQL

'第一级
if rs("jy")=1 then
sql="update sx set yz=yz+1000,jy=jy+10000 where cstr(ids)="&myid
liao.execute sql
Application.Unlock
msg="你今天任务完成,成功完成任务!获得金币1000,体力加10,魅力加10,智力加10,才华加10!!努力工作吧!"
end if
end if
response.write msg
function sqlstr(data)
   sqlstr="'" & Replace(data,"'","'") & "'"
  End function

set rec=nothing

%>

<%qingtian.shuchu%>

